select ENTRADA_CONFERIDA,* 
from  LOJA_ENTRADAS
where NUMERO_NF_TRANSFERENCIA = '008826'

where FILIAL  = '066_INTERLAGOS'
and NUMERO_NF_TRANSFERENCIA = '008826'
select top 2 * from LOJA_ENTRADAS

where Faturamento.NF_SAIDA = '008826'
and Faturamento.filial = '066_INTERLAGOS'



select * fr

from entradas 
       WHERE FATURAMENTO.FILIAL   = @FILIAL      AND          
               NF_SAIDA             = @NF_SAIDA    AND          
               SERIE_NF             = @SERIE_NF    AND          
               (LOJA_ENTRADAS.ENTRADA_CONFERIDA = 1 OR LOJA_ENTRADAS.ENTRADA_CONFERIDA IS NULL )          

select * from FATURAMENTO
WHERE FATURAMENTO.FILIAL   = @FILIAL      AND          
               NF_SAIDA             = @NF_SAIDA    AND          
               SERIE_NF             = @SERIE_NF    AND          
               (LOJA_ENTRADAS.ENTRADA_CONFERIDA = 1 OR LOJA_ENTRADAS.ENTRADA_CONFERIDA IS NULL )          


select * from

       WHERE FATURAMENTO.FILIAL   = @FILIAL      AND          
               NF_SAIDA             = @NF_SAIDA    AND          
               SERIE_NF             = @SERIE_NF    AND          
               (LOJA_ENTRADAS.ENTRADA_CONFERIDA = 1 OR LOJA_ENTRADAS.ENTRADA_CONFERIDA IS NULL )          
